package com.test.controller;

import com.test.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/")

public class IndexController {

	@RequestMapping(value = "/")
	//默认首页
	public String index() {
		return new String("index");
	}

	@RequestMapping(value = "/text")
	@ResponseBody
	//这个页面返回文字
	public String text() {
		return new String("随便写点文字!");
	}

	@RequestMapping(value = "/1")
	//这个页面跳转到指定页面1.htm
	public String One() {
		return "1";
	}

}
